import * as components from './components'
// 引入element-plus提供的图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const install = (app) => {
  Object.entries(components).forEach(([key, value]) => {
    app.component(key, value)
  })
  // 将element-plus提供的图标注册到全局组件
  for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }
}
// 对外暴露插件对象
export default install
export * from './components'
